/**
 * 
 */
package com.nari.heatshare.action;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.ServletContext;

import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.json.JSONUtil;
import org.apache.struts2.json.annotations.JSON;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;

import com.nari.baseinfo.model.IBuilding;
import com.nari.baseinfo.model.ICommunity;
import com.nari.baseinfo.model.IHeatMeter;
import com.nari.baseinfo.model.IProject;
import com.nari.baseinfo.model.IShareArea;
import com.nari.baseinfo.service.IBuildingService;
import com.nari.baseinfo.service.ICommunityService;
import com.nari.baseinfo.service.IHeatMeterService;
import com.nari.baseinfo.service.IProjectService;
import com.nari.baseinfo.service.IShareAreaService;
import com.nari.coreframe.action.struts2.JSONActionSupport;
import com.nari.heatshare.model.IHeatMeterDataGather;
import com.nari.heatshare.service.IHeatMeterDataGatherService;
import com.nari.heatshare.utils.queryvo.HeatMeterDataCustomizedQuery;
import com.nari.heatshare.utils.queryvo.HeatMeterDataRecordExtendQuery;
import com.nari.interfaces.action.HeatMeterData24GatherAction;
import com.nari.interfaces.model.IHeatMeterData24Gather;
import com.nari.platform.model.PageCond;
import com.nari.platform.model.ResponseMsg;
import com.nari.platform.model.ResultWithPageCond;
import com.nari.platform.utils.CommercialHighPrecisionArith;
import com.opensymphony.xwork2.Action;
import com.sohoometer.web.excel.ExcelExportUtils;

/**
 * 
 * @author Xiaopeng
 * @date 2013-8-19
 */
public class HeatMeterDataGatherAction extends JSONActionSupport {
	private static final long serialVersionUID = 6896055816190641904L;
	private IHeatMeterDataGatherService iHeatMeterDataGatherService;
	private IHeatMeterService iHeatMeterService;
	private IProjectService iProjectService;
	private ICommunityService iCommunityService;
	private IBuildingService iBuildingService;
	private IShareAreaService iShareAreaService;
	//热量表数据信息查询
	private String meterNo;
	private Date recordTime;
	//分页查询
	private int pageIndex = 1; //默认查询第一页列表
	private PageCond pageCond;
	private int pageSize;
	private ResultWithPageCond<IHeatMeterDataGather> meterDataPage;
	//热量表数据信息管理
	private String heatMeterUID;
	private IHeatMeter heatMeter;
	private String projectUID;
	private String communityUID;
	private String buildingUID;
	private String shareAreaUID;
	private List<IProject> projectList;
	private List<ICommunity> communityList;
	private List<IShareArea> shareAreaList;
	private List<IHeatMeter> heatMeterList;
	private String meterDataUID;
	private IHeatMeterDataGather meterData;
	//热量表数据详细资料
	private IProject project;
	private ICommunity community;
	private IBuilding building;
	private IShareArea shareArea;
	//热量表数据定制查询
	private Date recordTimeStart;
	private Date recordTimeEnd;
	private ResultWithPageCond<HeatMeterDataCustomizedQuery> customizedQueryPage;
	private Map<String, String> pageProjectMap;
	private Map<String, String> pageCommunityMap;
	private int heatMeterNum;
	private int heatMeterDataCounter;
	private List<IHeatMeterDataGather> heatMeterDataList;
	//热量表数据的档案扩展信息
	private Map<String, HeatMeterDataRecordExtendQuery> hmdRecordExtendMap;
	
	/**
	 * 热量表数据批次管理的首页导航
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2014-12-11
	 */
	public String queryHeatMeterDataMgrNav() throws Exception {
		//导航热量表数据管理页
		return "heatMeterDataMgr";
	}
	
	/**
	 * 分页查询热量表数据
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2013-8-30
	 */
	public String queryMeterDataPage() throws Exception {
		//分页信息
		this.pageCond = new PageCond();
		int start = (this.pageIndex - 1) * this.pageCond.getLimit();
		this.pageCond.setStart(start);
		//分页结果
		this.meterDataPage = this.iHeatMeterDataGatherService.queryMeterDataPage(meterNo, recordTime, pageCond);
		//计算结果集的页数
		this.pageSize = CommercialHighPrecisionArith.divide2Integer4Up(this.meterDataPage.getPageCond().getTotal(), 
				this.meterDataPage.getPageCond().getLimit());
		//档案扩展资料
		this.hmdRecordExtendMap = iHeatMeterDataGatherService.queryHmdRecordExtend(meterDataPage.getList());
		return "meterDataPage";
	}
	
	/**
	 * 分页查询热量表数据定制查询列表
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2014-12-11
	 */
	public String queryCustomizedHmDataPage() throws Exception {
		//所属项目列表
		this.projectList = this.iProjectService.queryAllProjectInOrder();
		if(this.projectList == null) {
			this.projectList = new ArrayList<IProject>();
		}
		//所属小区列表
		if(this.projectUID!=null && !"".equals(projectUID)) {
			this.communityList = this.iCommunityService.queryCommunitysByBelongings(null, null, null, projectUID);
		} else {
			this.communityList = new ArrayList<ICommunity>();
		}
		//分页查询
		this.pageCond = new PageCond();
		int start = (this.pageIndex - 1) * this.pageCond.getLimit();
		this.pageCond.setStart(start);
		//设置查询的抄表日期，遵循就近一致原则
		if(this.recordTimeStart==null && this.recordTimeEnd==null) {
			this.recordTimeStart = this.recordTimeEnd = new Date();
		}
		if(this.recordTimeStart!=null && this.recordTimeEnd==null) {
			this.recordTimeEnd = this.recordTimeStart;
		}
		if(this.recordTimeStart==null && this.recordTimeEnd!=null) {
			this.recordTimeStart = this.recordTimeEnd;
		}
		this.customizedQueryPage = iHeatMeterDataGatherService.queryCustomizedQueryPage(projectUID, 
				communityUID, recordTimeStart, recordTimeEnd, pageCond);
		//计算结果集的页数
		this.pageSize = new BigDecimal(this.customizedQueryPage.getPageCond().getTotal())
				.divide(new BigDecimal(this.customizedQueryPage.getPageCond().getLimit()), RoundingMode.UP)
				.intValue();
		if(pageSize == 0) pageSize = 1;
		// 项目映射表
		this.pageProjectMap = new HashMap<String, String>();
		for (IProject project : this.projectList) {
			this.pageProjectMap.put(project.getId(), project.getProjectName());
		}
		// 小区映射表
		this.pageCommunityMap = iHeatMeterDataGatherService.queryReferCommunitysByCustomizedList(customizedQueryPage.getList());
		return "customizedPage";
	}
	
	/**
	 * 查询定制查询详细信息(依热小区分类)
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2014-12-11
	 */
	public String queryCustomizedHmDataDetail() throws Exception {
		//所属小区
		if(this.communityUID!=null && !"".equals(communityUID)) {
			this.community = iCommunityService.queryEntityById(communityUID);
		}
		if(community != null) {
			//所属项目
			this.project = iProjectService.queryEntityById(community.getProjectID());
		}
		//小区热量表数据个数
		this.heatMeterDataCounter = iHeatMeterDataGatherService.countCustomizedHmDataList(communityUID, recordTime);
		//小区所属的热量表数
		this.heatMeterNum = iHeatMeterService.countMeterSumByBelongs(null, communityUID, null, null);
		return "communityHmDataDetail";
	}
	
	/**
	 * 查询小区所属热量表的抄收数据
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2014-12-11
	 */
	public String queryCommunityHmDataList() throws Exception {
		this.heatMeterDataList = iHeatMeterDataGatherService.queryCustomizedHmDataList(communityUID, recordTime);
		//档案扩展资料
		this.hmdRecordExtendMap = iHeatMeterDataGatherService.queryHmdRecordExtend(heatMeterDataList);
		return "communityHmDataList";
	}
	
	/**
	 * 热量表数据信息管理
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2013-8-30
	 */
	public String queryMeterDataForManage() throws Exception {
		if(this.meterDataUID!=null && !"".equals(meterDataUID)) {
			//热量表数据
			this.meterData = this.iHeatMeterDataGatherService.queryEntityById(meterDataUID);
			//热量表
			this.heatMeter = this.iHeatMeterService.queryMeterByMeterNo(meterData.getMeterNo());
			if(heatMeter != null) {
				//热量表ID
				this.heatMeterUID = this.heatMeter.getId();
				//所属项目
				this.projectUID = this.heatMeter.getProjectID();
				//所属小区
				this.communityUID = this.heatMeter.getCommunityID();
				//所属分摊区域
				this.shareAreaUID = this.heatMeter.getShareAreaID();
			}
		}
		//所属项目列表
		this.projectList = this.iProjectService.queryAllProjectInOrder();
		if(this.projectList == null) {
			this.projectList = new ArrayList<IProject>();
		}
		//所属小区
		this.communityList = this.iCommunityService.queryCommunitysByBelongings(null, null, null, projectUID);
		//所属分摊域
		this.shareAreaList = this.iShareAreaService.queryShareAreaByBelongings(projectUID, communityUID);
		//热量表
		this.heatMeterList = this.iHeatMeterService.queryMetersByBelongs(projectUID, communityUID, buildingUID, shareAreaUID);
		return "meterDataManage";
	}
	
	/**
	 * 新增或修改热量表数据
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2013-8-30
	 */
	public String saveOrUpdateMeterData() throws Exception {
		//热量表信息
		this.heatMeter = this.iHeatMeterService.queryEntityById(heatMeterUID);
		if(heatMeter != null) {
			this.meterData.setMeterNo(this.heatMeter.getMeterNo());
		}
		//设置热功率即瞬时功率
		meterData.setHeatPower(meterData.getInstantPower());
		//热量表数据信息保存
		this.rmsg = iHeatMeterDataGatherService.saveOrUpdateMeterData(meterData);
		this.writeJsonStrToResponse(JSONUtil.serialize(rmsg));
		return Action.SUCCESS;
	}
	
	/**
	 * 通过唯一标识删除热量表数据
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2013-8-30
	 */
	public String deleteMeterDataByUID() throws Exception {
		this.iHeatMeterDataGatherService.deleteEntityById(meterDataUID);
		this.writeJsonStrToResponse(JSONUtil.serialize(ResponseMsg.getInstance(true, "")));
		return Action.SUCCESS;
	}
	
	/**
	 * 查询热量表数据详细资料
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2013-8-30
	 */
	public String queryMeterDataDetail() throws Exception {
		//热量表数据
		this.meterData = this.iHeatMeterDataGatherService.queryEntityById(meterDataUID);
		//热量表
		this.heatMeter = this.iHeatMeterService.queryMeterByMeterNo(meterData.getMeterNo());
		if(heatMeter != null) {
			//所属项目
			if(heatMeter.getProjectID()!=null && !"".equals(heatMeter.getProjectID())) {
				this.project = this.iProjectService.queryEntityById(heatMeter.getProjectID());
			}
			//所属小区
			if(heatMeter.getCommunityID()!=null && !"".equals(heatMeter.getCommunityID())) {
				this.community = this.iCommunityService.queryEntityById(heatMeter.getCommunityID());
			}
			//所属楼栋
			if(heatMeter.getBuildingID()!=null && !"".equals(heatMeter.getBuildingID())) {
				this.building = iBuildingService.queryEntityById(heatMeter.getBuildingID());
			}
			//所属分摊域
			if(heatMeter.getShareAreaID()!=null && !"".equals(heatMeter.getShareAreaID())) {
				this.shareArea = this.iShareAreaService.queryEntityById(heatMeter.getShareAreaID());
			}
		}
		return "meterDataDetail";
	}
	
	/**
	 * 热量表数据定制查询
	 * @input  communityUID 社区编号 
	 * @input recordTime 抄表日期
	 * */
 public String exportHeatMeterData() throws Exception{
	 //查询热量表数据
	 queryCustomizedHmDataDetail();
	 queryCommunityHmDataList();
	  HSSFWorkbook heatMeasureCommunityWorkbook = new ExcelExportUtils().getHeatMeasureCommunityWorkbook(community, project, recordTime, heatMeterDataList, hmdRecordExtendMap);
	  ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
	 heatMeasureCommunityWorkbook.write(byteStream);
	 ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(byteStream.toByteArray());
	 setTargetFile(byteArrayInputStream);
	 String name = "热量表数据定制查询下载.xls";
//	 String newName = new String(name.getBytes("utf-8"),"iso-8859-1");
	 setOutputFileName(URLEncoder.encode(name, "utf-8"));
	IOUtils.closeQuietly(byteStream);
	//输入流手动关闭，输出流交给struts2去关闭
	 return "downloadFile";
 }
	
 
 	/**
	 * 热量表数据采集信息
	 * */
	public String exportHeatMeterDataDetail() throws Exception{
	queryMeterDataDetail();
	//由于信息来自另一个Action 需要从Spring容器中得到这么一个Action
	ServletContext servletContext = ServletActionContext.getServletContext();
	WebApplicationContext applicationContext = WebApplicationContextUtils.getWebApplicationContext(servletContext);
	HeatMeterData24GatherAction heatMeterData24GatherAction = (HeatMeterData24GatherAction) applicationContext.getBean("heatMeterData24GatherAction");
	if(meterData==null||StringUtils.isBlank(meterData.getMeterNo())) return null;  //信息没有进来 不能导出
	heatMeterData24GatherAction.setMeterNo(meterData.getMeterNo());
	heatMeterData24GatherAction.setRecordTime(meterData.getRecordTime());
	heatMeterData24GatherAction.queryMeterDataList4Statis();
	List<IHeatMeterData24Gather> meterDataList4Statis = heatMeterData24GatherAction.getMeterDataList4Statis();
	//通过借用Action来实现,这个效率。。。爆了。。
	
	HSSFWorkbook heatMeasureInfoWorkbook = new ExcelExportUtils().getHeatMeasureInfoWorkbook(meterData, heatMeter, project, community, building, meterDataList4Statis);
	 ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
	 heatMeasureInfoWorkbook.write(byteStream);
	 ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(byteStream.toByteArray());
	 setTargetFile(byteArrayInputStream);
	 String name = "热量表数据采集信息.xls";
//	 String newName = new String(name.getBytes("utf-8"),"iso-8859-1");
	 setOutputFileName(URLEncoder.encode(name, "utf-8"));
	 IOUtils.closeQuietly(byteStream);
	 return "downloadFile";
	}
 
 
	/**
	 * @return the iHeatMeterDataGatherService
	 */
	@JSON(serialize=false)
	public IHeatMeterDataGatherService getiHeatMeterDataGatherService() {
		return iHeatMeterDataGatherService;
	}
	
	/**
	 * @param iHeatMeterDataGatherService the iHeatMeterDataGatherService to set
	 */
	public void setiHeatMeterDataGatherService(
			IHeatMeterDataGatherService iHeatMeterDataGatherService) {
		this.iHeatMeterDataGatherService = iHeatMeterDataGatherService;
	}

	/**
	 * @return the iHeatMeterService
	 */
	@JSON(serialize=false)
	public IHeatMeterService getiHeatMeterService() {
		return iHeatMeterService;
	}

	/**
	 * @param iHeatMeterService the iHeatMeterService to set
	 */
	public void setiHeatMeterService(IHeatMeterService iHeatMeterService) {
		this.iHeatMeterService = iHeatMeterService;
	}

	/**
	 * @return the iProjectService
	 */
	@JSON(serialize=false)
	public IProjectService getiProjectService() {
		return iProjectService;
	}

	/**
	 * @param iProjectService the iProjectService to set
	 */
	public void setiProjectService(IProjectService iProjectService) {
		this.iProjectService = iProjectService;
	}

	/**
	 * @return the iCommunityService
	 */
	@JSON(serialize=false)
	public ICommunityService getiCommunityService() {
		return iCommunityService;
	}

	/**
	 * @param iCommunityService the iCommunityService to set
	 */
	public void setiCommunityService(ICommunityService iCommunityService) {
		this.iCommunityService = iCommunityService;
	}

	/**
	 * @return the iBuildingService
	 */
	@JSON(serialize=false)
	public IBuildingService getiBuildingService() {
		return iBuildingService;
	}

	/**
	 * @param iBuildingService the iBuildingService to set
	 */
	public void setiBuildingService(IBuildingService iBuildingService) {
		this.iBuildingService = iBuildingService;
	}

	/**
	 * @return the iShareAreaService
	 */
	@JSON(serialize=false)
	public IShareAreaService getiShareAreaService() {
		return iShareAreaService;
	}

	/**
	 * @param iShareAreaService the iShareAreaService to set
	 */
	public void setiShareAreaService(IShareAreaService iShareAreaService) {
		this.iShareAreaService = iShareAreaService;
	}

	/**
	 * @return the meterNo
	 */
	public String getMeterNo() {
		return meterNo;
	}

	/**
	 * @param meterNo the meterNo to set
	 */
	public void setMeterNo(String meterNo) {
		this.meterNo = meterNo;
	}

	/**
	 * @return the recordTime
	 */
	public Date getRecordTime() {
		return recordTime;
	}

	/**
	 * @param recordTime the recordTime to set
	 */
	public void setRecordTime(Date recordTime) {
		this.recordTime = recordTime;
	}

	/**
	 * @return the pageIndex
	 */
	public int getPageIndex() {
		return pageIndex;
	}

	/**
	 * @param pageIndex the pageIndex to set
	 */
	public void setPageIndex(int pageIndex) {
		this.pageIndex = pageIndex;
	}

	/**
	 * @return the pageCond
	 */
	public PageCond getPageCond() {
		return pageCond;
	}

	/**
	 * @param pageCond the pageCond to set
	 */
	public void setPageCond(PageCond pageCond) {
		this.pageCond = pageCond;
	}

	/**
	 * @return the pageSize
	 */
	public int getPageSize() {
		return pageSize;
	}

	/**
	 * @param pageSize the pageSize to set
	 */
	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	/**
	 * @return the meterDataPage
	 */
	public ResultWithPageCond<IHeatMeterDataGather> getMeterDataPage() {
		return meterDataPage;
	}

	/**
	 * @param meterDataPage the meterDataPage to set
	 */
	public void setMeterDataPage(
			ResultWithPageCond<IHeatMeterDataGather> meterDataPage) {
		this.meterDataPage = meterDataPage;
	}

	/**
	 * @return the heatMeterUID
	 */
	public String getHeatMeterUID() {
		return heatMeterUID;
	}

	/**
	 * @param heatMeterUID the heatMeterUID to set
	 */
	public void setHeatMeterUID(String heatMeterUID) {
		this.heatMeterUID = heatMeterUID;
	}

	/**
	 * @return the heatMeter
	 */
	public IHeatMeter getHeatMeter() {
		return heatMeter;
	}

	/**
	 * @param heatMeter the heatMeter to set
	 */
	public void setHeatMeter(IHeatMeter heatMeter) {
		this.heatMeter = heatMeter;
	}

	/**
	 * @return the projectUID
	 */
	public String getProjectUID() {
		return projectUID;
	}

	/**
	 * @param projectUID the projectUID to set
	 */
	public void setProjectUID(String projectUID) {
		this.projectUID = projectUID;
	}

	/**
	 * @return the communityUID
	 */
	public String getCommunityUID() {
		return communityUID;
	}

	/**
	 * @param communityUID the communityUID to set
	 */
	public void setCommunityUID(String communityUID) {
		this.communityUID = communityUID;
	}

	/**
	 * @return the buildingUID
	 */
	public String getBuildingUID() {
		return buildingUID;
	}

	/**
	 * @param buildingUID the buildingUID to set
	 */
	public void setBuildingUID(String buildingUID) {
		this.buildingUID = buildingUID;
	}

	/**
	 * @return the shareAreaUID
	 */
	public String getShareAreaUID() {
		return shareAreaUID;
	}

	/**
	 * @param shareAreaUID the shareAreaUID to set
	 */
	public void setShareAreaUID(String shareAreaUID) {
		this.shareAreaUID = shareAreaUID;
	}

	/**
	 * @return the projectList
	 */
	public List<IProject> getProjectList() {
		return projectList;
	}

	/**
	 * @param projectList the projectList to set
	 */
	public void setProjectList(List<IProject> projectList) {
		this.projectList = projectList;
	}

	/**
	 * @return the communityList
	 */
	public List<ICommunity> getCommunityList() {
		return communityList;
	}

	/**
	 * @param communityList the communityList to set
	 */
	public void setCommunityList(List<ICommunity> communityList) {
		this.communityList = communityList;
	}

	/**
	 * @return the shareAreaList
	 */
	public List<IShareArea> getShareAreaList() {
		return shareAreaList;
	}

	/**
	 * @param shareAreaList the shareAreaList to set
	 */
	public void setShareAreaList(List<IShareArea> shareAreaList) {
		this.shareAreaList = shareAreaList;
	}

	/**
	 * @return the heatMeterList
	 */
	public List<IHeatMeter> getHeatMeterList() {
		return heatMeterList;
	}

	/**
	 * @param heatMeterList the heatMeterList to set
	 */
	public void setHeatMeterList(List<IHeatMeter> heatMeterList) {
		this.heatMeterList = heatMeterList;
	}

	/**
	 * @return the meterDataUID
	 */
	public String getMeterDataUID() {
		return meterDataUID;
	}

	/**
	 * @param meterDataUID the meterDataUID to set
	 */
	public void setMeterDataUID(String meterDataUID) {
		this.meterDataUID = meterDataUID;
	}

	/**
	 * @return the meterData
	 */
	public IHeatMeterDataGather getMeterData() {
		return meterData;
	}

	/**
	 * @param meterData the meterData to set
	 */
	public void setMeterData(IHeatMeterDataGather meterData) {
		this.meterData = meterData;
	}

	/**
	 * @return the project
	 */
	public IProject getProject() {
		return project;
	}

	/**
	 * @param project the project to set
	 */
	public void setProject(IProject project) {
		this.project = project;
	}

	/**
	 * @return the community
	 */
	public ICommunity getCommunity() {
		return community;
	}

	/**
	 * @param community the community to set
	 */
	public void setCommunity(ICommunity community) {
		this.community = community;
	}

	/**
	 * @return the building
	 */
	public IBuilding getBuilding() {
		return building;
	}

	/**
	 * @param building the building to set
	 */
	public void setBuilding(IBuilding building) {
		this.building = building;
	}

	/**
	 * @return the shareArea
	 */
	public IShareArea getShareArea() {
		return shareArea;
	}

	/**
	 * @param shareArea the shareArea to set
	 */
	public void setShareArea(IShareArea shareArea) {
		this.shareArea = shareArea;
	}

	/**
	 * @return the recordTimeStart
	 */
	public Date getRecordTimeStart() {
		return recordTimeStart;
	}

	/**
	 * @param recordTimeStart the recordTimeStart to set
	 */
	public void setRecordTimeStart(Date recordTimeStart) {
		this.recordTimeStart = recordTimeStart;
	}

	/**
	 * @return the recordTimeEnd
	 */
	public Date getRecordTimeEnd() {
		return recordTimeEnd;
	}

	/**
	 * @param recordTimeEnd the recordTimeEnd to set
	 */
	public void setRecordTimeEnd(Date recordTimeEnd) {
		this.recordTimeEnd = recordTimeEnd;
	}

	/**
	 * @return the customizedQueryPage
	 */
	public ResultWithPageCond<HeatMeterDataCustomizedQuery> getCustomizedQueryPage() {
		return customizedQueryPage;
	}

	/**
	 * @param customizedQueryPage the customizedQueryPage to set
	 */
	public void setCustomizedQueryPage(
			ResultWithPageCond<HeatMeterDataCustomizedQuery> customizedQueryPage) {
		this.customizedQueryPage = customizedQueryPage;
	}

	/**
	 * @return the pageProjectMap
	 */
	public Map<String, String> getPageProjectMap() {
		return pageProjectMap;
	}

	/**
	 * @param pageProjectMap the pageProjectMap to set
	 */
	public void setPageProjectMap(Map<String, String> pageProjectMap) {
		this.pageProjectMap = pageProjectMap;
	}

	/**
	 * @return the pageCommunityMap
	 */
	public Map<String, String> getPageCommunityMap() {
		return pageCommunityMap;
	}

	/**
	 * @param pageCommunityMap the pageCommunityMap to set
	 */
	public void setPageCommunityMap(Map<String, String> pageCommunityMap) {
		this.pageCommunityMap = pageCommunityMap;
	}

	/**
	 * @return the heatMeterNum
	 */
	public int getHeatMeterNum() {
		return heatMeterNum;
	}

	/**
	 * @param heatMeterNum the heatMeterNum to set
	 */
	public void setHeatMeterNum(int heatMeterNum) {
		this.heatMeterNum = heatMeterNum;
	}

	/**
	 * @return the heatMeterDataCounter
	 */
	public int getHeatMeterDataCounter() {
		return heatMeterDataCounter;
	}

	/**
	 * @param heatMeterDataCounter the heatMeterDataCounter to set
	 */
	public void setHeatMeterDataCounter(int heatMeterDataCounter) {
		this.heatMeterDataCounter = heatMeterDataCounter;
	}

	/**
	 * @return the heatMeterDataList
	 */
	public List<IHeatMeterDataGather> getHeatMeterDataList() {
		return heatMeterDataList;
	}

	/**
	 * @param heatMeterDataList the heatMeterDataList to set
	 */
	public void setHeatMeterDataList(List<IHeatMeterDataGather> heatMeterDataList) {
		this.heatMeterDataList = heatMeterDataList;
	}

	/**
	 * @return the hmdRecordExtendMap
	 */
	public Map<String, HeatMeterDataRecordExtendQuery> getHmdRecordExtendMap() {
		return hmdRecordExtendMap;
	}

	/**
	 * @param hmdRecordExtendMap the hmdRecordExtendMap to set
	 */
	public void setHmdRecordExtendMap(
			Map<String, HeatMeterDataRecordExtendQuery> hmdRecordExtendMap) {
		this.hmdRecordExtendMap = hmdRecordExtendMap;
	}
	
}
